package com.xh.service.imp;

import com.xh.dao.UserMapper;
import com.xh.service.UserService;
import com.xh.vo.LogUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class UserServiceImp implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public List<LogUser> getUser() {
        return userMapper.getUser();
    }

    @Override
    public LogUser getLogUser(String name, String pwd) {
        return userMapper.getLogUser(name, pwd);
    }

    @Override
    public LogUser getLoginUserByName(String name) {
        return userMapper.getLoginUserByName(name);
    }

    @Override
    public void InsertLoginUser(LogUser logUser) {
        userMapper.InsertLoginUser(logUser);
    }

    @Override
    public void updatePwdByUserId(Integer userId,String Pwd) {
        userMapper.updatePwdByUserId(userId,Pwd);
    }

    @Override
    public LogUser queryPwd(Integer userId,String orgPwd) {
        return userMapper.queryPwd(userId,orgPwd);
    }

    @Override
    public void updateHead(String headPath, Integer userId) {
        userMapper.updateHead(headPath,userId);
    }

    @Override
    public String queryHeadPathByUserName(String userName) {
        return userMapper.queryHeadPathByUserName(userName);
    }
}
